class MyEagerSingleton {
    private static final MyEagerSingleton INSTANCE = new MyEagerSingleton();

    int x = 10;

    private MyEagerSingleton() {};

    public static MyEagerSingleton getInstance() {
        return INSTANCE;
    }

}

public class EagerSingleton {
    public static void main(String[] args) {
        MyEagerSingleton ret = MyEagerSingleton.getInstance();
        System.out.println(ret.x);
    }
}
